package cn.iocoder.yudao.module.carbon.api.accountboundary;


import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.carbon.api.accountboundary.dto.AccountBoundaryListReqDTO;
import cn.iocoder.yudao.module.carbon.api.accountboundary.dto.AccountBoundaryRespDTO;
import cn.iocoder.yudao.module.carbon.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 核算边界")
public interface AccountBoundaryApi {

    String PREFIX = ApiConstants.PREFIX + "/account-boundary";

    @PostMapping(PREFIX + "/list")
    @Operation(summary = "获取核算边界列表")
    CommonResult<List<AccountBoundaryRespDTO>> getAccountBoundaryList(@Valid @RequestBody AccountBoundaryListReqDTO reqDTO);

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "获取核算边界")
    CommonResult<AccountBoundaryRespDTO> getAccountBoundary(@RequestParam("standard") String standard,
                                                            @RequestParam("classification") String classification,
                                                            @RequestParam("category") String category);

    @GetMapping(PREFIX + "/get-by-id")
    @Operation(summary = "通过核算边界 ID 查询核算边界")
    @Parameter(name = "id", description = "核算边界编号", required = true, example = "1024")
    CommonResult<AccountBoundaryRespDTO> getAccountBoundaryById(@RequestParam("id") Long id);

}
